#include <stdio.h>
int main(void) {
  int age;      // variable
  float assets; // variable
  char pet[30]; // string
  printf("Enter your age, assets, and favorite pet.\n");
  scanf("%d %f", &age, &assets); // use the & here
  scanf("%s", pet);              // no & for char array
  printf("%d $%.2f %s\n", age, assets, pet);

  // use comma to separate two input variables
  // The scanf() function interprets this to 
  // mean that you will type a number, type a comma, and then type a second number.
  int m, n;
  printf(" use comma(,) to separate two inputs\n");
  scanf("%d,%d", &n, &m);
  printf(" m = %c, n = %c\n", m, n);

  //use Enter to separate
  printf(" use Enter to separate two inputs\n");
  scanf("%d%d", &n, &m); 
  printf(" m = %c, n = %c\n", m, n);

  //use space character to separate
  printf(" use whitespace character to separate two inputs\n");
  scanf("%d %d", &n, &m);
  printf(" m = %c, n = %c\n", m, n);
    
  char ch;

  printf(" read the first character including whitespace character\n");
  scanf("%c", &ch);
  printf(" ch = %c\n", ch);


  printf(" read the first non-whitespace character\n");
  scanf(" %c", &ch);
  printf(" ch = %c\n", ch);


  return 0;
}
